CREATE TABLE [dbo].[Content_UchPl]
(
[ik_upContent] [int] NOT NULL IDENTITY(1, 1),
[n_sem] [tinyint] NOT NULL,
[ik_vid_zanyat] [int] NOT NULL,
[i_hour_per_week] [int] NULL,
[ik_disc_uch_plan] [int] NULL,
[ik_kaf] [int] NULL,
[n_module] [tinyint] NULL,
[i_balls] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Content_UchPl] ADD CONSTRAINT [PK_Content_UchPl_auditor] PRIMARY KEY CLUSTERED  ([ik_upContent]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Content_UchPl] WITH NOCHECK ADD CONSTRAINT [FK_Content_UchPl_sv_disc] FOREIGN KEY ([ik_disc_uch_plan]) REFERENCES [dbo].[sv_disc] ([ik_disc_uch_plan]) ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[Content_UchPl] WITH NOCHECK ADD CONSTRAINT [FK_Content_UchPl_kafedra] FOREIGN KEY ([ik_kaf]) REFERENCES [dbo].[kafedra] ([ik_kaf])
GO
ALTER TABLE [dbo].[Content_UchPl] WITH NOCHECK ADD CONSTRAINT [FK_Content_UchPl_vid_zaniat] FOREIGN KEY ([ik_vid_zanyat]) REFERENCES [dbo].[vid_zaniat] ([iK_vid_zanyat])
GO
ALTER TABLE [dbo].[Content_UchPl] WITH NOCHECK ADD CONSTRAINT [FK_Content_UchPl_Semester] FOREIGN KEY ([n_sem]) REFERENCES [dbo].[Semester] ([n_sem])
GO
